const Koa = require('koa');
const useRouter = require('../router')
const bodyParser = require('koa-bodyparser')
const errorHandler = require('./errorHandler')

const app = new Koa();
app.use(bodyParser())
useRouter(app)
app.on('error', errorHandler)
module.exports = app;